
<!-- target:adjust -->
<form class="edit-container style-bill order-edit-container grey-bg vertical-arrangement flex-cont" name="adjustInvoiceForm" ui="type:m-panel">
    <!-- if:${id} -->
    <input name="id" ui="type:text" class="ui-hide" value="${id}">
    <!-- /if -->

    <div class="blank-24"></div>

    <div class="edit-item" ui="type:mao.ui.InputGroup;label:发票类型;required:true">
        <!-- var:finBillInvoicesType = ${mao.info.baseInfo.finBillInvoicesType} || [] -->
        <div class="edit-input placeholder" ui="type:NS.TypeSelectEdit;id:type-${num};title:发票类型;items:&{finBillInvoicesType};name:invoicesType;value:${detail.invoicesType};text:${detail.invoicesType|parseBaseInfo('finBillInvoicesType')};"></div>
        <span class="edit-icon"></span>
    </div>
    <div class="edit-item" ui="type:mao.ui.InputGroup;label:开票日期;">

        <div class="edit-input" ui="type:m-calendar;id:date-${num};name:date;value:${detail.date|dateFormat('yyyy-MM-dd')};">
            <div ui="values:2000-2040;format:{0}年"></div>
            <div ui="values:1-12;format:{0}月"></div>
            <div ui="values:1-31;format:{0}日"></div>
        </div>
        <span class="edit-icon"></span>
    </div>
    <div class="edit-item" ui="type:mao.ui.InputGroup;label:发票代码;">
        <div ui="type:Text;id:code-${num}" class="edit-text">
            <input type="text" name="invoiceCode" value="${detail.invoiceCode}" placeholder="请输入" value="" />
        </div>
    </div>
    <div class="edit-item" ui="type:mao.ui.InputGroup;label:发票号码;">
        <div ui="type:Text;id:number-${num}" class="edit-text">
            <input type="text" name="invoiceNumber" value="${detail.invoiceNumber}" placeholder="请输入" value="" />
        </div>
    </div>
    <div class="edit-item" ui="type:mao.ui.InputGroup;label:校验码;">
        <div ui="type:Text;id:check-code-${num}" class="edit-text">
            <input type="text" name="checkCode" value="${detail.checkCode}" placeholder="请输入" value="" />
        </div>
    </div>
    <div class="edit-item" ui="type:mao.ui.InputGroup;label:税前金额;">
        <div ui="type:Text;id:pre-tax-amount-${num}" class="edit-text">
            <input type="text" name="totalAmount" value="${detail.totalAmount}" placeholder="请输入" value="" />
        </div>
    </div>
    <div class="edit-item" ui="type:mao.ui.InputGroup;label:金额;">
        <div ui="type:Text;id:amount-${num}" class="edit-text">
            <input type="text" name="totalAmount" value="${detail.totalAmount}" placeholder="请输入" value="" />
        </div>
    </div>
    <div class="edit-item" ui="type:mao.ui.InputGroup;label:税额;">
        <div ui="type:number;id:tax-${num}">
            <input type="text" name="invoiceTax" value="${detail.invoiceTax}" class="fl  height-text" placeholder="请输入" autocomplete="off">
        </div>
    </div>
    <div class="edit-item file-item" ui="type:mao.ui.InputGroup;label:发票图片;">
        <div class="edit-text">
            <a class="icon" ui="type:b-img-fill;ext-link;ext-stop-propagation" href="${detail.fileUrl}" target="_blank">
                <!-- var:isPdf = /\.([a-zA-Z0-9]+)$/.test(${detail.fileUrl}) -->
                <!-- var:fileType = RegExp.$1 -->
                <!-- if:${fileType} === 'pdf' -->
                <img src="images/base/pdf-default.jpg" class="invoice-img">
                <!-- else -->
                <img src="${detail.fileUrl}" class="invoice-img">
                <!-- /if -->
            </a>
            <div class="file-info">
                <div class="name">${detail.fileName}</div>
                <div class="size">大小</div>
            </div>
        </div>
    </div>

    <div class="blank-24"></div>
</form>

<div class="bottom-box">
    <div class="btn-box">
        <!-- <div class="ui-button" ui="type:NS.SaveBookBtn;again:true;orderId:${detail.id}">验真</div> -->
        <div class="ui-button ui-button-primary" ui="type:NS.SaveInvoiceBtn;orderId:${detail.id}">保存</div>
    </div>
</div>
